import request from '@/utils/request';
import IS_MOCK, { BASE_URL } from '@/utils/url';

//获取设备列表
export async function getPolluteChart(params) {
  const { chartData } = params;
  return IS_MOCK
    ? request(`/api/polluteData/getPolluteChart`, {
        method: 'post',
        data: {
          ...chartData,
        },
      })
    : request(`${BASE_URL}/alarmlevel/getPolluteChart`, {
        method: 'post',
        data: {
          ...chartData,
        },
      });
}
